package com.ruoyi.inventory.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.inventory.mapper.TbInventoryMapper;
import com.ruoyi.inventory.domain.TbInventory;
import com.ruoyi.inventory.service.ITbInventoryService;

/**
 * 药品库存量Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class TbInventoryServiceImpl implements ITbInventoryService 
{
    @Autowired
    private TbInventoryMapper tbInventoryMapper;

    /**
     * 查询药品库存量
     * 
     * @param inventoryId 药品库存量主键
     * @return 药品库存量
     */
    @Override
    public TbInventory selectTbInventoryByInventoryId(Long inventoryId)
    {
        return tbInventoryMapper.selectTbInventoryByInventoryId(inventoryId);
    }

    /**
     * 查询药品库存量列表
     * 
     * @param tbInventory 药品库存量
     * @return 药品库存量
     */
    @Override
    public List<TbInventory> selectTbInventoryList(TbInventory tbInventory)
    {
        return tbInventoryMapper.selectTbInventoryList(tbInventory);
    }

    /**
     * 新增药品库存量
     * 
     * @param tbInventory 药品库存量
     * @return 结果
     */
    @Override
    public int insertTbInventory(TbInventory tbInventory)
    {
        return tbInventoryMapper.insertTbInventory(tbInventory);
    }

    /**
     * 修改药品库存量
     * 
     * @param tbInventory 药品库存量
     * @return 结果
     */
    @Override
    public int updateTbInventory(TbInventory tbInventory)
    {
        return tbInventoryMapper.updateTbInventory(tbInventory);
    }

    /**
     * 批量删除药品库存量
     * 
     * @param inventoryIds 需要删除的药品库存量主键
     * @return 结果
     */
    @Override
    public int deleteTbInventoryByInventoryIds(Long[] inventoryIds)
    {
        return tbInventoryMapper.deleteTbInventoryByInventoryIds(inventoryIds);
    }

    /**
     * 删除药品库存量信息
     * 
     * @param inventoryId 药品库存量主键
     * @return 结果
     */
    @Override
    public int deleteTbInventoryByInventoryId(Long inventoryId)
    {
        return tbInventoryMapper.deleteTbInventoryByInventoryId(inventoryId);
    }
}
